package com.jbit.examSystem.dao;

import com.jbit.examSystem.exception.LoginErrorException;
import com.jbit.examSystem.pojo.Administrator;
import com.jbit.examSystem.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

public interface AdminDao {

    Administrator loginByNameAndPassword(@Param("name")String name,@Param("password") String password) throws LoginErrorException;

    void setLoginTime(@Param("loginTime") Date loginTime,
                      @Param("id") Integer id,
                      @Param("lastLoginTime") Date lastLoginTime);

    Administrator getByName(String name);

    void updatePwd(User user);
}
